﻿#include "proxy.h"

#include "realsubject.h"

#include <QDebug>

Proxy::Proxy() : Subject()
{
    m_subject = new RealSubject();
}

Proxy::~Proxy()
{
    delete m_subject;
}

void Proxy::request()
{
    preRequest();
    m_subject->request();
    afterRequest();
}

void Proxy::preRequest()
{
    qDebug() << "preRequest";
}

void Proxy::afterRequest()
{
    qDebug() << "afterRequest";
}
